package br.com.dp.dao.entidade;

import java.io.Serializable;
import javax.persistence.*;
import java.util.List;


/**
 * The persistent class for the status_quarto database table.
 * 
 */
@Entity
@Table(name="status_quarto")
@NamedQuery(name="StatusQuarto.findAll", query="SELECT s FROM StatusQuarto s")
public class StatusQuarto implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(unique=true, nullable=false)
	private int id;

	@Column(nullable=false, length=45)
	private String descricao;

	//bi-directional many-to-one association to Dia
	@OneToMany(mappedBy="statusQuarto")
	private List<Dia> dias;

	public StatusQuarto() {
	}

	public int getId() {
		return this.id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public String getDescricao() {
		return this.descricao;
	}

	public void setDescricao(String descricao) {
		this.descricao = descricao;
	}

	public List<Dia> getDias() {
		return this.dias;
	}

	public void setDias(List<Dia> dias) {
		this.dias = dias;
	}

	public Dia addDia(Dia dia) {
		getDias().add(dia);
		dia.setStatusQuarto(this);

		return dia;
	}

	public Dia removeDia(Dia dia) {
		getDias().remove(dia);
		dia.setStatusQuarto(null);

		return dia;
	}

}